.reviews-container {
  min-height: 100vh;
  background-color: #f5f5f5;
  padding-bottom: 40rpx;
  display: flex;
  flex-direction: column;
}

/* 主内容包装器 */
.main-content-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* 固定头部区域 */
.fixed-header {
  position: fixed;
  /* top值通过内联样式动态设置，确保从导航栏底部开始 */
  left: 0;
  right: 0;
  z-index: 99; /* 低于导航栏的z-index */
  background-color: #f5f5f5;
  padding: 20rpx;
  padding-bottom: 10rpx;
  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
}

/* 确保导航栏固定在最上层 */
.reviews-container .weui-navigation-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: white;
}

.reviews-container .weui-navigation-bar__inner {
  position: relative;
  z-index: 1000;
  background-color: white;
}

/* 占位元素，用于为固定头部留出空间 */
.header-placeholder {
  flex-shrink: 0;
  /* 高度通过内联样式动态设置 */
}

/* 登录提示 */
.login-prompt {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60rpx;
  
  .login-card {
    background: white;
    border-radius: 20rpx;
    padding: 80rpx 60rpx;
    text-align: center;
    box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500rpx;
    
    .login-icon {
      width: 120rpx;
      height: 120rpx;
      margin-bottom: 40rpx;
      opacity: 0.6;
    }
    
    .login-title {
      display: block;
      font-size: 36rpx;
      font-weight: bold;
      color: #333;
      margin-bottom: 20rpx;
    }
    
    .login-desc {
      display: block;
      font-size: 28rpx;
      color: #999;
      margin-bottom: 60rpx;
    }
    
    .login-btn {
      background: #5cb85c;
      color: white;
      border-radius: 50rpx;
      font-size: 32rpx;
      padding: 24rpx 80rpx;
      border: none;
      
      &::after {
        border: none;
      }
    }
  }
}

/* 主要内容 */
.main-content {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* 占位元素，用于为固定头部留出空间 */
.header-placeholder {
  flex-shrink: 0;
}

/* 统计区域 */
.stats-section {
  background: white;
  border-radius: 16rpx;
  padding: 30rpx;
  margin-bottom: 20rpx;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
  
  .rating-overview {
    display: flex;
    margin-bottom: 30rpx;
    
    .overall-rating {
      flex: 1;
      text-align: center;
      padding-right: 30rpx;
      
      .rating-score {
        display: block;
        font-size: 80rpx;
        font-weight: bold;
        color: #ff6b35;
        margin-bottom: 10rpx;
      }
      
      .rating-stars {
        .star-row {
          margin-bottom: 10rpx;
          display: flex;
          align-items: center;
          
          .star-wrapper {
            position: relative;
            display: inline-block;
            margin-right: 5rpx;
            width: 32rpx;
            height: 32rpx;
            
            .star {
              font-size: 32rpx;
              line-height: 32rpx;
              display: block;
              
              &.star-bg {
                color: #ddd;
              }
              
              &.star-filled {
                color: #ff6b35;
              }
            }
            
            .star-overlay {
              position: absolute;
              top: 0;
              left: 0;
              height: 100%;
              overflow: hidden;
              
              &.star-overlay-full {
                width: 100%;
              }
              
              &.star-overlay-partial {
                // width 通过内联样式设置
              }
            }
          }
        }
        
        .total-reviews {
          font-size: 24rpx;
          color: #999;
        }
      }
    }
    
    .rating-distribution {
      flex: 1.5;
      
      .rating-bar {
        display: flex;
        align-items: center;
        margin-bottom: 12rpx;
        
        .rating-label {
          font-size: 24rpx;
          color: #666;
          width: 60rpx;
        }
        
        .bar-track {
          flex: 1;
          height: 12rpx;
          background: #f0f0f0;
          border-radius: 6rpx;
          margin: 0 15rpx;
          overflow: hidden;
          
          .bar-fill {
            height: 100%;
            background: #ff6b35;
            border-radius: 6rpx;
            transition: width 0.3s ease;
          }
        }
        
        .rating-count {
          font-size: 24rpx;
          color: #666;
          width: 60rpx;
          text-align: right;
        }
      }
    }
  }
  
  .dimension-ratings {
    display: flex;
    justify-content: space-around;
    padding-top: 30rpx;
    border-top: 1rpx solid #f0f0f0;
    
    .dimension-item {
      text-align: center;
      
      .dimension-label {
        display: block;
        font-size: 24rpx;
        color: #999;
        margin-bottom: 10rpx;
      }
      
      .dimension-score {
        font-size: 36rpx;
        font-weight: bold;
        color: #5cb85c;
      }
    }
  }
}

/* 筛选区域 */
.filter-section {
  background: white;
  border-radius: 16rpx;
  padding: 20rpx;
  margin-bottom: 20rpx;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
  
  .filter-tabs {
    .tabs-scroll {
      white-space: nowrap;
    }
    
    .tab-item {
      display: inline-block;
      padding: 16rpx 24rpx;
      margin-right: 15rpx;
      font-size: 26rpx;
      color: #666;
      background: #f8f9fa;
      border-radius: 20rpx;
      border: 1rpx solid transparent;
      
      &.active {
        background: #5cb85c;
        color: white;
        font-weight: 500;
      }
    }
  }
}

/* 评价列表 */
.review-list {
  flex: 1;
  height: 0; /* 配合flex使用 */
  padding: 0 20rpx;
  padding-top: 40rpx; /* 增加顶部内边距，确保第一条评论有足够空间 */
}

.review-card {
  background: white;
  border-radius: 16rpx;
  padding: 30rpx;
  margin-bottom: 20rpx;
  box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
  
  .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20rpx;
    
    .user-info {
      display: flex;
      align-items: center;
      
      .user-avatar {
        width: 80rpx;
        height: 80rpx;
        border-radius: 50%;
        margin-right: 20rpx;
        background: #f0f0f0;
      }
      
      .user-details {
        .user-name {
          display: block;
          font-size: 30rpx;
          color: #333;
          font-weight: 500;
          margin-bottom: 8rpx;
        }
        
        .review-time {
          font-size: 24rpx;
          color: #999;
        }
      }
    }
    
    .rating-display {
      text-align: right;
      
      .stars {
        margin-bottom: 5rpx;
        
        .star {
          font-size: 28rpx;
          color: #ddd;
          margin-left: 3rpx;
          
          &.filled {
            color: #ff6b35;
          }
        }
      }
      
      .rating-text {
        font-size: 24rpx;
        color: #666;
      }
    }
  }
  
  .review-content {
    margin-bottom: 20rpx;
    
    .review-text {
      font-size: 30rpx;
      color: #333;
      line-height: 1.5;
      margin-bottom: 20rpx;
      word-break: break-all;
    }
    
    .review-toggle {
      font-size: 26rpx;
      color: #5cb85c;
      margin-bottom: 20rpx;
      display: inline-block;
    }
    
    .review-images {
      display: flex;
      gap: 15rpx;
      margin-bottom: 20rpx;
      
      .review-image {
        width: 120rpx;
        height: 120rpx;
        border-radius: 8rpx;
        background: #f0f0f0;
      }
    }
    
    .review-tags {
      display: flex;
      gap: 10rpx;
      flex-wrap: wrap;
      
      .review-tag {
        background: #e8f5e8;
        color: #5cb85c;
        padding: 8rpx 16rpx;
        border-radius: 16rpx;
        font-size: 24rpx;
      }
    }
  }
  
  .product-info {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 20rpx;
    border-radius: 12rpx;
    margin-bottom: 20rpx;
    
    .product-image {
      width: 60rpx;
      height: 60rpx;
      border-radius: 8rpx;
      margin-right: 15rpx;
    }
    
    .product-name {
      font-size: 26rpx;
      color: #666;
    }
  }
  
  .merchant-reply {
    background: #f0f8f0;
    padding: 25rpx;
    border-radius: 12rpx;
    margin-bottom: 20rpx;
    border-left: 6rpx solid #5cb85c;
    
    .reply-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15rpx;
      
      .reply-label {
        font-size: 26rpx;
        color: #5cb85c;
        font-weight: 500;
      }
      
      .reply-time {
        font-size: 22rpx;
        color: #999;
      }
    }
    
    .reply-content {
      font-size: 28rpx;
      color: #333;
      line-height: 1.5;
    }
  }
  
  .review-actions {
    display: flex;
    justify-content: flex-end;
    
    .reply-btn {
      padding: 20rpx 40rpx;
      border-radius: 25rpx;
      font-size: 26rpx;
      border: none;
      
      &.primary {
        background: #5cb85c;
        color: white;
      }
      
      &.replied {
        background: #f5f5f5;
        color: #999;
      }
      
      &::after {
        border: none;
      }
    }
  }
}

.content-modal {
  width: 600rpx;
  .detail-reviewer {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20rpx;
    .reviewer-name {
      font-weight: 600;
      color: #333;
    }
    .review-time {
      color: #999;
      font-size: 24rpx;
    }
  }
  .detail-content-scroll {
    max-height: 600rpx;
    padding: 20rpx 0;
  }
  .detail-content {
    font-size: 30rpx;
    color: #333;
    line-height: 1.6;
    word-break: break-all;
  }
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100rpx 60rpx;
  text-align: center;
  
  .empty-icon {
    width: 200rpx;
    height: 200rpx;
    margin-bottom: 30rpx;
    opacity: 0.3;
  }
  
  .empty-text {
    font-size: 30rpx;
    color: #999;
  }
}

/* 加载更多 */
.load-more {
  text-align: center;
  padding: 40rpx;
  
  text {
    font-size: 28rpx;
    color: #5cb85c;
    padding: 20rpx;
  }
}

/* 回复弹窗 */
.reply-modal {
  .modal-body {
    .original-review {
      background: #f8f9fa;
      padding: 25rpx;
      border-radius: 12rpx;
      margin-bottom: 30rpx;
      
      .review-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15rpx;
        
        .reviewer-name {
          font-size: 28rpx;
          color: #333;
          font-weight: 500;
        }
        
        .review-rating {
          .star {
            font-size: 24rpx;
            color: #ddd;
            
            &.filled {
              color: #ff6b35;
            }
          }
        }
      }
      
      .review-text {
        font-size: 28rpx;
        color: #666;
        line-height: 1.5;
      }
    }
    
    .reply-input-section {
      margin-bottom: 30rpx;
      
      .form-label {
        display: block;
        font-size: 28rpx;
        font-weight: 600;
        color: #333;
        margin-bottom: 15rpx;
      }
      
      .reply-textarea {
        width: 100%;
        min-height: 200rpx;
        padding: 20rpx;
        border: 2rpx solid #e0e0e0;
        border-radius: 12rpx;
        font-size: 30rpx;
        background: #fafafa;
        line-height: 1.5;
        
        &:focus {
          border-color: #5cb85c;
          background: white;
        }
      }
      
      .char-count {
        display: block;
        text-align: right;
        font-size: 24rpx;
        color: #999;
        margin-top: 10rpx;
      }
    }
    
    .quick-replies {
      .quick-label {
        font-size: 26rpx;
        color: #666;
        margin-bottom: 15rpx;
      }
      
      .quick-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 10rpx;
        
        .quick-btn {
          padding: 12rpx 20rpx;
          background: #f8f9fa;
          border: 1rpx solid #e9ecef;
          border-radius: 20rpx;
          font-size: 24rpx;
          color: #666;
        }
      }
    }
  }
}

/* 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40rpx;
}

.modal-content {
  background: white;
  border-radius: 20rpx;
  width: 100%;
  max-width: 600rpx;
  max-height: 80vh;
  overflow: hidden;
  
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30rpx;
    border-bottom: 1rpx solid #f0f0f0;
    
    .modal-title {
      font-size: 32rpx;
      font-weight: bold;
      color: #333;
    }
    
    .modal-close {
      font-size: 48rpx;
      color: #999;
      line-height: 1;
      padding: 10rpx;
    }
  }
  
  .modal-body {
    padding: 30rpx;
    max-height: 60vh;
    overflow-y: auto;
  }
  
  .modal-footer {
    display: flex;
    gap: 20rpx;
    padding: 30rpx;
    border-top: 1rpx solid #f0f0f0;
    
    .cancel-btn {
      flex: 1;
      padding: 25rpx;
      background: #f5f5f5;
      color: #666;
      border-radius: 12rpx;
      font-size: 30rpx;
      border: none;
      
      &::after {
        border: none;
      }
    }
    
    .confirm-btn {
      flex: 1;
      padding: 25rpx;
      background: #5cb85c;
      color: white;
      border-radius: 12rpx;
      font-size: 30rpx;
      border: none;
      
      &::after {
        border: none;
      }
      
      &:disabled {
        background: #ccc;
      }
    }
  }
}

